<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="http://1stjs.googlecode.com/svn/trunk/fw4/" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>兼容的复制功能演示</title>
<script type="text/javascript" src="1st.js"></script>
<script type="text/javascript" src="data/js/ZeroClipboard.js"></script>
<script type="text/javascript">
function init() {
	clip = new ZeroClipboard.Client();
	clip.setHandCursor(true);
	clip.addEventListener('mouseOver', function(client){clip.setText(F('box').val())});
	clip.addEventListener('complete', function(client,text){
		alert("生成的代码已经复制到粘贴板，你可以使用Ctrl+V 贴到需要的地方去了哦！");
	});
	clip.glue("btn_copy");
}
</script>
</head>

<body onload="init();">
<textArea id="box">copytext</textArea>
<button id="btn_copy">复制文本</button>
</body>
</html>